package com.ea.common.enums;

/**
 * @author NAME-L
 * @Description 账户状态枚举类
 * @className AccountStatus
 * @date 2022-12-21 23:02:54
 */
public enum AccountStatusEnums {

    NORMAL(0, "正常"),

    BANNED(1, "封禁"),

    DELETE(2, "删除"),

    BE_ACTIVATE(3, "待激活"),

    ;

    private Integer code;
    private String desc;

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    AccountStatusEnums(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String getStatusDesc(Integer code) {
        for (AccountStatusEnums enums : values()) {
            if (enums.getCode().equals(code)) {
                return enums.getDesc();
            }
        }
        return null;
    }
}
